<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>couchdbkit</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;couchdbkit
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="couchdbkit-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="couchdbkit-module.html">Package couchdbkit</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment"># -*- coding: utf-8 -</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"># This file is part of couchdbkit released under the MIT license.</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-comment"># See the NOTICE for more information.</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Module couchdbkit.version=couchdbkit.version-module.html"><a title="couchdbkit.version" class="py-name" href="#" onclick="return doclink('link-0', 'version', 'link-0');">version</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable couchdbkit.version.version_info=couchdbkit.version-module.html#version_info"><a title="couchdbkit.version.version_info" class="py-name" href="#" onclick="return doclink('link-1', 'version_info', 'link-1');">version_info</a></tt><tt class="py-op">,</tt> <tt class="py-name">__version__</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Module couchdbkit.resource=couchdbkit.resource-module.html"><a title="couchdbkit.resource" class="py-name" href="#" onclick="return doclink('link-2', 'resource', 'link-2');">resource</a></tt> <tt class="py-keyword">import</tt>  <tt class="py-name">RequestFailed</tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Class couchdbkit.resource.CouchdbResource=couchdbkit.resource.CouchdbResource-class.html"><a title="couchdbkit.resource.CouchdbResource" class="py-name" href="#" onclick="return doclink('link-3', 'CouchdbResource', 'link-3');">CouchdbResource</a></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module couchdbkit.exceptions=couchdbkit.exceptions-module.html"><a title="couchdbkit.exceptions" class="py-name" href="#" onclick="return doclink('link-4', 'exceptions', 'link-4');">exceptions</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class couchdbkit.exceptions.InvalidAttachment=couchdbkit.exceptions.InvalidAttachment-class.html"><a title="couchdbkit.exceptions.InvalidAttachment" class="py-name" href="#" onclick="return doclink('link-5', 'InvalidAttachment', 'link-5');">InvalidAttachment</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Class couchdbkit.exceptions.DuplicatePropertyError=couchdbkit.exceptions.DuplicatePropertyError-class.html"><a title="couchdbkit.exceptions.DuplicatePropertyError" class="py-name" href="#" onclick="return doclink('link-6', 'DuplicatePropertyError', 'link-6');">DuplicatePropertyError</a></tt><tt class="py-op">,</tt>\ </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Class couchdbkit.exceptions.BadValueError=couchdbkit.exceptions.BadValueError-class.html"><a title="couchdbkit.exceptions.BadValueError" class="py-name" href="#" onclick="return doclink('link-7', 'BadValueError', 'link-7');">BadValueError</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class couchdbkit.exceptions.MultipleResultsFound=couchdbkit.exceptions.MultipleResultsFound-class.html"><a title="couchdbkit.exceptions.MultipleResultsFound" class="py-name" href="#" onclick="return doclink('link-8', 'MultipleResultsFound', 'link-8');">MultipleResultsFound</a></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Class couchdbkit.exceptions.NoResultFound=couchdbkit.exceptions.NoResultFound-class.html"><a title="couchdbkit.exceptions.NoResultFound" class="py-name" href="#" onclick="return doclink('link-9', 'NoResultFound', 'link-9');">NoResultFound</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Class couchdbkit.exceptions.ReservedWordError=couchdbkit.exceptions.ReservedWordError-class.html"><a title="couchdbkit.exceptions.ReservedWordError" class="py-name" href="#" onclick="return doclink('link-10', 'ReservedWordError', 'link-10');">ReservedWordError</a></tt><tt class="py-op">,</tt>\ </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt id="link-11" class="py-name" targets="Class couchdbkit.exceptions.DocsPathNotFound=couchdbkit.exceptions.DocsPathNotFound-class.html"><a title="couchdbkit.exceptions.DocsPathNotFound" class="py-name" href="#" onclick="return doclink('link-11', 'DocsPathNotFound', 'link-11');">DocsPathNotFound</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Class couchdbkit.exceptions.BulkSaveError=couchdbkit.exceptions.BulkSaveError-class.html"><a title="couchdbkit.exceptions.BulkSaveError" class="py-name" href="#" onclick="return doclink('link-12', 'BulkSaveError', 'link-12');">BulkSaveError</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Class couchdbkit.exceptions.ResourceNotFound=couchdbkit.exceptions.ResourceNotFound-class.html"><a title="couchdbkit.exceptions.ResourceNotFound" class="py-name" href="#" onclick="return doclink('link-13', 'ResourceNotFound', 'link-13');">ResourceNotFound</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class couchdbkit.exceptions.ResourceConflict=couchdbkit.exceptions.ResourceConflict-class.html"><a title="couchdbkit.exceptions.ResourceConflict" class="py-name" href="#" onclick="return doclink('link-14', 'ResourceConflict', 'link-14');">ResourceConflict</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt id="link-15" class="py-name" targets="Class couchdbkit.exceptions.PreconditionFailed=couchdbkit.exceptions.PreconditionFailed-class.html"><a title="couchdbkit.exceptions.PreconditionFailed" class="py-name" href="#" onclick="return doclink('link-15', 'PreconditionFailed', 'link-15');">PreconditionFailed</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Module couchdbkit.client=couchdbkit.client-module.html"><a title="couchdbkit.client" class="py-name" href="#" onclick="return doclink('link-16', 'client', 'link-16');">client</a></tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class couchdbkit.client.Server=couchdbkit.client.Server-class.html"><a title="couchdbkit.client.Server" class="py-name" href="#" onclick="return doclink('link-17', 'Server', 'link-17');">Server</a></tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name" targets="Class couchdbkit.client.Database=couchdbkit.client.Database-class.html"><a title="couchdbkit.client.Database" class="py-name" href="#" onclick="return doclink('link-18', 'Database', 'link-18');">Database</a></tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class couchdbkit.client.ViewResults=couchdbkit.client.ViewResults-class.html"><a title="couchdbkit.client.ViewResults" class="py-name" href="#" onclick="return doclink('link-19', 'ViewResults', 'link-19');">ViewResults</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Module couchdbkit.changes=couchdbkit.changes-module.html"><a title="couchdbkit.changes" class="py-name" href="#" onclick="return doclink('link-20', 'changes', 'link-20');">changes</a></tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Class couchdbkit.changes.ChangesStream=couchdbkit.changes.ChangesStream-class.html"><a title="couchdbkit.changes.ChangesStream" class="py-name" href="#" onclick="return doclink('link-21', 'ChangesStream', 'link-21');">ChangesStream</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Package couchdbkit.consumer=couchdbkit.consumer-module.html"><a title="couchdbkit.consumer" class="py-name" href="#" onclick="return doclink('link-22', 'consumer', 'link-22');">consumer</a></tt> <tt class="py-keyword">import</tt> <tt id="link-23" class="py-name" targets="Class couchdbkit.consumer.Consumer=couchdbkit.consumer.Consumer-class.html"><a title="couchdbkit.consumer.Consumer" class="py-name" href="#" onclick="return doclink('link-23', 'Consumer', 'link-23');">Consumer</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Package couchdbkit.designer=couchdbkit.designer-module.html"><a title="couchdbkit.designer" class="py-name" href="#" onclick="return doclink('link-24', 'designer', 'link-24');">designer</a></tt> <tt class="py-keyword">import</tt> <tt id="link-25" class="py-name" targets="Function couchdbkit.designer.fs.document()=couchdbkit.designer.fs-module.html#document"><a title="couchdbkit.designer.fs.document" class="py-name" href="#" onclick="return doclink('link-25', 'document', 'link-25');">document</a></tt><tt class="py-op">,</tt> <tt id="link-26" class="py-name" targets="Method couchdbkit.designer.fs.FSDoc.push()=couchdbkit.designer.fs.FSDoc-class.html#push,Function couchdbkit.designer.fs.push()=couchdbkit.designer.fs-module.html#push"><a title="couchdbkit.designer.fs.FSDoc.push
couchdbkit.designer.fs.push" class="py-name" href="#" onclick="return doclink('link-26', 'push', 'link-26');">push</a></tt><tt class="py-op">,</tt> <tt id="link-27" class="py-name" targets="Function couchdbkit.designer.fs.pushdocs()=couchdbkit.designer.fs-module.html#pushdocs"><a title="couchdbkit.designer.fs.pushdocs" class="py-name" href="#" onclick="return doclink('link-27', 'pushdocs', 'link-27');">pushdocs</a></tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name" targets="Function couchdbkit.designer.fs.pushapps()=couchdbkit.designer.fs-module.html#pushapps"><a title="couchdbkit.designer.fs.pushapps" class="py-name" href="#" onclick="return doclink('link-28', 'pushapps', 'link-28');">pushapps</a></tt><tt class="py-op">,</tt> <tt id="link-29" class="py-name" targets="Function couchdbkit.designer.fs.clone()=couchdbkit.designer.fs-module.html#clone,Method couchdbkit.schema.base.DocumentSchema.clone()=couchdbkit.schema.base.DocumentSchema-class.html#clone"><a title="couchdbkit.designer.fs.clone
couchdbkit.schema.base.DocumentSchema.clone" class="py-name" href="#" onclick="return doclink('link-29', 'clone', 'link-29');">clone</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Module couchdbkit.external=couchdbkit.external-module.html"><a title="couchdbkit.external" class="py-name" href="#" onclick="return doclink('link-30', 'external', 'link-30');">external</a></tt> <tt class="py-keyword">import</tt> <tt id="link-31" class="py-name" targets="Class couchdbkit.external.External=couchdbkit.external.External-class.html"><a title="couchdbkit.external.External" class="py-name" href="#" onclick="return doclink('link-31', 'External', 'link-31');">External</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Module couchdbkit.loaders=couchdbkit.loaders-module.html"><a title="couchdbkit.loaders" class="py-name" href="#" onclick="return doclink('link-32', 'loaders', 'link-32');">loaders</a></tt> <tt class="py-keyword">import</tt> <tt id="link-33" class="py-name" targets="Class couchdbkit.loaders.BaseDocsLoader=couchdbkit.loaders.BaseDocsLoader-class.html"><a title="couchdbkit.loaders.BaseDocsLoader" class="py-name" href="#" onclick="return doclink('link-33', 'BaseDocsLoader', 'link-33');">BaseDocsLoader</a></tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name" targets="Class couchdbkit.loaders.FileSystemDocsLoader=couchdbkit.loaders.FileSystemDocsLoader-class.html"><a title="couchdbkit.loaders.FileSystemDocsLoader" class="py-name" href="#" onclick="return doclink('link-34', 'FileSystemDocsLoader', 'link-34');">FileSystemDocsLoader</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Module couchdbkit.ext.django.schema=couchdbkit.ext.django.schema-module.html,Package couchdbkit.schema=couchdbkit.schema-module.html"><a title="couchdbkit.ext.django.schema
couchdbkit.schema" class="py-name" href="#" onclick="return doclink('link-35', 'schema', 'link-35');">schema</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">(</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">    <tt id="link-36" class="py-name" targets="Class couchdbkit.schema.properties.Property=couchdbkit.schema.properties.Property-class.html"><a title="couchdbkit.schema.properties.Property" class="py-name" href="#" onclick="return doclink('link-36', 'Property', 'link-36');">Property</a></tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name" targets="Class couchdbkit.schema.properties.IntegerProperty=couchdbkit.schema.properties.IntegerProperty-class.html"><a title="couchdbkit.schema.properties.IntegerProperty" class="py-name" href="#" onclick="return doclink('link-37', 'IntegerProperty', 'link-37');">IntegerProperty</a></tt><tt class="py-op">,</tt> <tt id="link-38" class="py-name" targets="Class couchdbkit.schema.properties.DecimalProperty=couchdbkit.schema.properties.DecimalProperty-class.html"><a title="couchdbkit.schema.properties.DecimalProperty" class="py-name" href="#" onclick="return doclink('link-38', 'DecimalProperty', 'link-38');">DecimalProperty</a></tt><tt class="py-op">,</tt> <tt id="link-39" class="py-name" targets="Class couchdbkit.schema.properties.BooleanProperty=couchdbkit.schema.properties.BooleanProperty-class.html"><a title="couchdbkit.schema.properties.BooleanProperty" class="py-name" href="#" onclick="return doclink('link-39', 'BooleanProperty', 'link-39');">BooleanProperty</a></tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name" targets="Class couchdbkit.schema.properties.FloatProperty=couchdbkit.schema.properties.FloatProperty-class.html"><a title="couchdbkit.schema.properties.FloatProperty" class="py-name" href="#" onclick="return doclink('link-40', 'FloatProperty', 'link-40');">FloatProperty</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name" targets="Class couchdbkit.schema.properties.StringProperty=couchdbkit.schema.properties.StringProperty-class.html"><a title="couchdbkit.schema.properties.StringProperty" class="py-name" href="#" onclick="return doclink('link-41', 'StringProperty', 'link-41');">StringProperty</a></tt><tt class="py-op">,</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">    <tt id="link-42" class="py-name" targets="Class couchdbkit.schema.properties.DateTimeProperty=couchdbkit.schema.properties.DateTimeProperty-class.html"><a title="couchdbkit.schema.properties.DateTimeProperty" class="py-name" href="#" onclick="return doclink('link-42', 'DateTimeProperty', 'link-42');">DateTimeProperty</a></tt><tt class="py-op">,</tt> <tt id="link-43" class="py-name" targets="Class couchdbkit.schema.properties.DateProperty=couchdbkit.schema.properties.DateProperty-class.html"><a title="couchdbkit.schema.properties.DateProperty" class="py-name" href="#" onclick="return doclink('link-43', 'DateProperty', 'link-43');">DateProperty</a></tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name" targets="Class couchdbkit.schema.properties.TimeProperty=couchdbkit.schema.properties.TimeProperty-class.html"><a title="couchdbkit.schema.properties.TimeProperty" class="py-name" href="#" onclick="return doclink('link-44', 'TimeProperty', 'link-44');">TimeProperty</a></tt><tt class="py-op">,</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">    <tt id="link-45" class="py-name" targets="Function couchdbkit.schema.properties.dict_to_json()=couchdbkit.schema.properties-module.html#dict_to_json"><a title="couchdbkit.schema.properties.dict_to_json" class="py-name" href="#" onclick="return doclink('link-45', 'dict_to_json', 'link-45');">dict_to_json</a></tt><tt class="py-op">,</tt> <tt id="link-46" class="py-name"><a title="couchdbkit.schema.properties.dict_to_json" class="py-name" href="#" onclick="return doclink('link-46', 'dict_to_json', 'link-45');">dict_to_json</a></tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name"><a title="couchdbkit.schema.properties.dict_to_json" class="py-name" href="#" onclick="return doclink('link-47', 'dict_to_json', 'link-45');">dict_to_json</a></tt><tt class="py-op">,</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt id="link-48" class="py-name" targets="Function couchdbkit.schema.properties.value_to_python()=couchdbkit.schema.properties-module.html#value_to_python"><a title="couchdbkit.schema.properties.value_to_python" class="py-name" href="#" onclick="return doclink('link-48', 'value_to_python', 'link-48');">value_to_python</a></tt><tt class="py-op">,</tt> <tt id="link-49" class="py-name" targets="Function couchdbkit.schema.properties.dict_to_python()=couchdbkit.schema.properties-module.html#dict_to_python"><a title="couchdbkit.schema.properties.dict_to_python" class="py-name" href="#" onclick="return doclink('link-49', 'dict_to_python', 'link-49');">dict_to_python</a></tt><tt class="py-op">,</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">    <tt id="link-50" class="py-name" targets="Class couchdbkit.schema.base.DocumentSchema=couchdbkit.schema.base.DocumentSchema-class.html"><a title="couchdbkit.schema.base.DocumentSchema" class="py-name" href="#" onclick="return doclink('link-50', 'DocumentSchema', 'link-50');">DocumentSchema</a></tt><tt class="py-op">,</tt> <tt id="link-51" class="py-name" targets="Class couchdbkit.schema.base.DocumentBase=couchdbkit.schema.base.DocumentBase-class.html"><a title="couchdbkit.schema.base.DocumentBase" class="py-name" href="#" onclick="return doclink('link-51', 'DocumentBase', 'link-51');">DocumentBase</a></tt><tt class="py-op">,</tt> <tt id="link-52" class="py-name" targets="Class couchdbkit.ext.django.schema.Document=couchdbkit.ext.django.schema.Document-class.html,Class couchdbkit.schema.base.Document=couchdbkit.schema.base.Document-class.html"><a title="couchdbkit.ext.django.schema.Document
couchdbkit.schema.base.Document" class="py-name" href="#" onclick="return doclink('link-52', 'Document', 'link-52');">Document</a></tt><tt class="py-op">,</tt> <tt id="link-53" class="py-name" targets="Class couchdbkit.schema.base.StaticDocument=couchdbkit.schema.base.StaticDocument-class.html"><a title="couchdbkit.schema.base.StaticDocument" class="py-name" href="#" onclick="return doclink('link-53', 'StaticDocument', 'link-53');">StaticDocument</a></tt><tt class="py-op">,</tt> <tt id="link-54" class="py-name" targets="Function couchdbkit.schema.contain()=couchdbkit.schema-module.html#contain"><a title="couchdbkit.schema.contain" class="py-name" href="#" onclick="return doclink('link-54', 'contain', 'link-54');">contain</a></tt><tt class="py-op">,</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">    <tt id="link-55" class="py-name" targets="Class couchdbkit.schema.base.QueryMixin=couchdbkit.schema.base.QueryMixin-class.html"><a title="couchdbkit.schema.base.QueryMixin" class="py-name" href="#" onclick="return doclink('link-55', 'QueryMixin', 'link-55');">QueryMixin</a></tt><tt class="py-op">,</tt> <tt id="link-56" class="py-name" targets="Class couchdbkit.schema.base.AttachmentMixin=couchdbkit.schema.base.AttachmentMixin-class.html"><a title="couchdbkit.schema.base.AttachmentMixin" class="py-name" href="#" onclick="return doclink('link-56', 'AttachmentMixin', 'link-56');">AttachmentMixin</a></tt><tt class="py-op">,</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">    <tt id="link-57" class="py-name" targets="Class couchdbkit.schema.properties_proxy.SchemaProperty=couchdbkit.schema.properties_proxy.SchemaProperty-class.html"><a title="couchdbkit.schema.properties_proxy.SchemaProperty" class="py-name" href="#" onclick="return doclink('link-57', 'SchemaProperty', 'link-57');">SchemaProperty</a></tt><tt class="py-op">,</tt> <tt id="link-58" class="py-name" targets="Class couchdbkit.schema.properties_proxy.SchemaListProperty=couchdbkit.schema.properties_proxy.SchemaListProperty-class.html"><a title="couchdbkit.schema.properties_proxy.SchemaListProperty" class="py-name" href="#" onclick="return doclink('link-58', 'SchemaListProperty', 'link-58');">SchemaListProperty</a></tt><tt class="py-op">,</tt> <tt id="link-59" class="py-name" targets="Class couchdbkit.schema.properties_proxy.SchemaDictProperty=couchdbkit.schema.properties_proxy.SchemaDictProperty-class.html"><a title="couchdbkit.schema.properties_proxy.SchemaDictProperty" class="py-name" href="#" onclick="return doclink('link-59', 'SchemaDictProperty', 'link-59');">SchemaDictProperty</a></tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">    <tt id="link-60" class="py-name" targets="Class couchdbkit.schema.properties.ListProperty=couchdbkit.schema.properties.ListProperty-class.html"><a title="couchdbkit.schema.properties.ListProperty" class="py-name" href="#" onclick="return doclink('link-60', 'ListProperty', 'link-60');">ListProperty</a></tt><tt class="py-op">,</tt> <tt id="link-61" class="py-name" targets="Class couchdbkit.schema.properties.DictProperty=couchdbkit.schema.properties.DictProperty-class.html"><a title="couchdbkit.schema.properties.DictProperty" class="py-name" href="#" onclick="return doclink('link-61', 'DictProperty', 'link-61');">DictProperty</a></tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name" targets="Class couchdbkit.schema.properties.StringListProperty=couchdbkit.schema.properties.StringListProperty-class.html"><a title="couchdbkit.schema.properties.StringListProperty" class="py-name" href="#" onclick="return doclink('link-62', 'StringListProperty', 'link-62');">StringListProperty</a></tt><tt class="py-op">,</tt> <tt id="link-63" class="py-name" targets="Class couchdbkit.schema.properties.SetProperty=couchdbkit.schema.properties.SetProperty-class.html"><a title="couchdbkit.schema.properties.SetProperty" class="py-name" href="#" onclick="return doclink('link-63', 'SetProperty', 'link-63');">SetProperty</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt id="link-64" class="py-name" targets="Variable couchdbkit.LOG_LEVELS=couchdbkit-module.html#LOG_LEVELS"><a title="couchdbkit.LOG_LEVELS" class="py-name" href="#" onclick="return doclink('link-64', 'LOG_LEVELS', 'link-64');">LOG_LEVELS</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">    <tt class="py-string">"critical"</tt><tt class="py-op">:</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">CRITICAL</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">    <tt class="py-string">"error"</tt><tt class="py-op">:</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">ERROR</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">    <tt class="py-string">"warning"</tt><tt class="py-op">:</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">WARNING</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">    <tt class="py-string">"info"</tt><tt class="py-op">:</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">INFO</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">    <tt class="py-string">"debug"</tt><tt class="py-op">:</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"><tt class="py-op">}</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line"> </tt>
<a name="set_logging"></a><div id="set_logging-def"><a name="L42"></a><tt class="py-lineno">42</tt> <a class="py-toggle" href="#" id="set_logging-toggle" onclick="return toggle('set_logging');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="couchdbkit-module.html#set_logging">set_logging</a><tt class="py-op">(</tt><tt class="py-param">level</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="set_logging-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="set_logging-expanded"><a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line"><tt class="py-docstring">    Set level of logging, and choose where to display/save logs</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line"><tt class="py-docstring">    (file or standard output).</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-65" class="py-name" targets="Module couchdbkit.wsgi.handler=couchdbkit.wsgi.handler-module.html"><a title="couchdbkit.wsgi.handler" class="py-name" href="#" onclick="return doclink('link-65', 'handler', 'link-65');">handler</a></tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">        <tt id="link-66" class="py-name"><a title="couchdbkit.wsgi.handler" class="py-name" href="#" onclick="return doclink('link-66', 'handler', 'link-65');">handler</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">StreamHandler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">    <tt class="py-name">loglevel</tt> <tt class="py-op">=</tt> <tt id="link-67" class="py-name"><a title="couchdbkit.LOG_LEVELS" class="py-name" href="#" onclick="return doclink('link-67', 'LOG_LEVELS', 'link-64');">LOG_LEVELS</a></tt><tt class="py-op">.</tt><tt id="link-68" class="py-name" targets="Class Method couchdbkit.schema.base.DocumentBase.get()=couchdbkit.schema.base.DocumentBase-class.html#get"><a title="couchdbkit.schema.base.DocumentBase.get" class="py-name" href="#" onclick="return doclink('link-68', 'get', 'link-68');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">level</tt><tt class="py-op">,</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">INFO</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line">    <tt id="link-69" class="py-name" targets="Variable couchdbkit.designer.fs.logger=couchdbkit.designer.fs-module.html#logger,Variable couchdbkit.designer.macros.logger=couchdbkit.designer.macros-module.html#logger"><a title="couchdbkit.designer.fs.logger
couchdbkit.designer.macros.logger" class="py-name" href="#" onclick="return doclink('link-69', 'logger', 'link-69');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'couchdbkit'</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">    <tt id="link-70" class="py-name"><a title="couchdbkit.designer.fs.logger
couchdbkit.designer.macros.logger" class="py-name" href="#" onclick="return doclink('link-70', 'logger', 'link-69');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">loglevel</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">    <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">r"%(asctime)s [%(process)d] [%(levelname)s] %(message)s"</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">    <tt class="py-name">datefmt</tt> <tt class="py-op">=</tt> <tt class="py-string">r"%Y-%m-%d %H:%M:%S"</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line"> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">    <tt id="link-71" class="py-name"><a title="couchdbkit.wsgi.handler" class="py-name" href="#" onclick="return doclink('link-71', 'handler', 'link-65');">handler</a></tt><tt class="py-op">.</tt><tt class="py-name">setFormatter</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">Formatter</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt class="py-name">datefmt</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">    <tt id="link-72" class="py-name"><a title="couchdbkit.designer.fs.logger
couchdbkit.designer.macros.logger" class="py-name" href="#" onclick="return doclink('link-72', 'logger', 'link-69');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-73" class="py-name"><a title="couchdbkit.wsgi.handler" class="py-name" href="#" onclick="return doclink('link-73', 'handler', 'link-65');">handler</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri May  4 11:48:42 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
